import router from './router'
import defaultSettings from '@/settings'

// eslint-disable-next-line space-before-function-paren
router.beforeEach(async (to, from, next) => {
  // 设置页面标题
  document.title = to.meta.title ? `${to.meta.title} - ${defaultSettings.title}` : `${defaultSettings.title}`
  next()
})
